﻿<UserControl x:Class="Ccflow.Web.UI.Control.Workflow.Designer.FlowNode"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
              xmlns:sharedesigner="clr-namespace:Ccflow.Web.UI.Control.Workflow.Designer"
              MouseEnter="UserControl_MouseEnter"
             MouseLeave="UserControl_MouseLeave"             
             Width="200" Height="160" >
    <Canvas Name="container"     MouseRightButtonDown="eiCenterEllipse_MouseRightButtonDown" >

        <ToolTipService.ToolTip>
            <ToolTip  Visibility="Collapsed" Name="ttFlowNodeTip" Content="Turtle" FontWeight="Bold" VerticalOffset="10"
                 HorizontalOffset="10" >
                <ToolTip.Background>

                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="White"
                                 Offset="0"></GradientStop>
                        <GradientStop Color="DarkCyan"
                                 Offset="0.8"></GradientStop>

                    </LinearGradientBrush>

                </ToolTip.Background>

            </ToolTip>

        </ToolTipService.ToolTip>

        <Canvas.Resources>
            <Storyboard  x:Name="sbDisplay">
                <DoubleAnimation   From="0" To="0.8" Duration="00:00:1.0" 
                    Storyboard.TargetName="container" 
                    Storyboard.TargetProperty="Opacity" >
                </DoubleAnimation>
            </Storyboard>
            <Storyboard  x:Name="sbClose">
                <DoubleAnimation   From="0.8" To="0.0" Duration="00:00:1.0" 
                    Storyboard.TargetName="container" 
                    Storyboard.TargetProperty="Opacity" >
                </DoubleAnimation>
            </Storyboard>


        </Canvas.Resources>
        <Grid  HorizontalAlignment="Center" VerticalAlignment="Center">

            <Ellipse Canvas.ZIndex="100" Name="eiCenterEllipse" Fill="Black"  Stroke="Black"  Opacity="0.1" Canvas.Top="22.5" Canvas.Left="42.5" Width="15" Height="15"   Stretch="Fill" StrokeThickness="1"  
              MouseLeftButtonDown="CenterEllipse_MouseLeftButtonDown" 
             MouseMove="CenterEllipse_MouseMove"
             MouseLeftButtonUp="CenterEllipse_MouseLeftButtonUp">

            </Ellipse>

            <sharedesigner:FlowNodePictureContainer x:Name="sdPicture"   MouseLeftButtonDown="UserControl_MouseLeftButtonDown" 
             MouseLeftButtonUp="UserControl_MouseLeftButtonUp"
             MouseMove="UserControl_MouseMove" ></sharedesigner:FlowNodePictureContainer>
        </Grid>

    </Canvas>
</UserControl>
